<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>
<h1><?php echo Yii::t("msg", "0003");?></h1>
<hr>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=> true,
	'enableClientValidation'=> false,
	'htmlOptions' => array(
		'class' => 'form-horizontal',
        'enctype' => 'multipart/form-data'
	)
)); ?>

	<fieldset style="text-align:left">
        <div class="pull-left">
            <legend class="signup-section"><?php echo Yii::t("msg", "0001");?></legend>
            <div class="control-group">
                <?php echo $form->label($model,'username',array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model,'username', array('class' => 'span5'));?>
                    <?php echo $form->error($model,'username',array('inputContainer' => 'span','errorCssClass' => 'errorMsg')) ?>
                </div>
            </div>
            <div class="control-group">
                <?php echo $form->label($model,'password',array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->passwordField($model,'password', array('class' => 'span5'));?>
                    <?php echo $form->error($model,'password',array('inputContainer' => 'span','errorCssClass' => 'errorMsg')) ?>
                </div>
            </div>
            <div class="control-group">
                <?php echo $form->label($model,'re_password',array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->passwordField($model,'re_password', array('class' => 'span5'));?>
                    <?php echo $form->error($model,'re_password',array('inputContainer' => 'span','errorCssClass' => 'errorMsg')) ?>
                </div>
            </div>
            <legend class="signup-section"><?php echo Yii::t("msg", "0002");?></legend>
            <div class="control-group">
                <?php echo $form->label($model,'email',array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model,'email', array('class' => 'span5'));?>
                    <?php echo $form->error($model,'email',array('inputContainer' => 'span','errorCssClass' => 'errorMsg')) ?>
                </div>
            </div>
            <div class="control-group">
                <?php echo $form->label($model,'phone',array('class' => 'control-label')); ?>
                <div class="controls">
                    <?php echo $form->textField($model,'phone', array('class' => 'span5'));?>
                    <?php echo $form->error($model,'phone',array('inputContainer' => 'span','errorCssClass' => 'errorMsg')) ?>
                </div>
            </div>
            <?php if(CCaptcha::checkRequirements()): ?>
            <div class="control-group">
                <?php echo $form->labelEx($model,'verifyCode',array('class' => 'control-label')); ?>
                <div class="controls captcha">
                <?php $this->widget('CCaptcha'); ?><br>
                <?php echo $form->textField($model,'verifyCode'); ?>
                <?php echo $form->error($model,'verifyCode'); ?>
                </div>
            </div>
            <?php endif; ?>
        </div>
    
        <div class="pull-left signup-border-nav"></div>
        <div class="pull-left">
            <h1>Bạn đã là thành viên?</h1>
            <form name="aaaaaa" method="post" action="<?php echo Yii::app()->createUrl('user/create');?>" >
            <div style="width: 220px;margin:0 auto">
                <div class="control-group">
                    <div class="control"><?php echo $form->textField($loginForm, 'username', array('placeholder'=>Yii::t('main', 'holder.username')) ); ?></div>
                </div>
                <div class="control-group">
                    <div class="control"><?php echo $form->passwordField($loginForm, 'password', array('placeholder'=>Yii::t('main', 'holder.password')) ); ?></div>
                </div>
                <div class="control-group centered_lr" style="width:150px">
                    <div class="control"><label class="checkbox">
                        <input type="checkbox" value="1" name="keep_login">
                        <?php echo Yii::t('main', 'chb.autologin'); ?>
                      </label></div>
                </div>
                <div class="control-group">
                    <button type='submit' class="btn btn-primary" name="LoginBtn"><?php echo Yii::t('main', 'btn.login'); ?></button>
                    <a class="btn testcolor" href="<?php echo $this->createUrl('user/forgotpassword');?>"><?php echo Yii::t('main', 'btn.forgot_pwd'); ?></a>
                </div>
                <div class="text-right">
                    <?php
                        $this->widget('ext.eauth.EAuthWidget', array('action' => 'user/login'));
                    ?>
                    <div class="text-inline"><?php echo Yii::t('main', 'login_by'); ?></div>
                    <div style="clear:both;"></div>
                    <span class="auth-service google">
                        <a href="<?php echo Yii::app()->createUrl('user/login',array('service' => 'google'))?>"><span class="google-mini"></span></a>
                    </span>
                    <span class="auth-service facebook">
                        <a href="<?php echo Yii::app()->createUrl('user/login',array('service' => 'facebook'))?>"><span class="facebook-mini"></span></a>
                    </span>
                    <span class="auth-service twitter">
                        <a href="<?php echo Yii::app()->createUrl('user/login',array('service' => 'twitter'))?>" class=""><span class="twitter-mini"></span></a>
                    </span>
                </div>
            </div>
            </form>
        </div>
        <div class="clearfix"></div>
        <div class="form-actions">
            <p>Khi bạn bấm vào nút đăng ký đồng nghĩa là bạn đã đọc và đồng ý với tất cả những nội dung trong bản <a href="#">thỏa thuận</a> của chúng tôi</p>
            <button type="submit" class="btn btn-primary"><?php echo Yii::t("lbl", "0001");?></button>
            <button type="reset" class="btn" ><?php echo Yii::t("lbl", "0002");?></button>
        </div>
    </fieldset>
</div><!-- form -->

<?php $this->endWidget(); ?>